// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/*!
 * @file SDPltVelocityMsg.cpp
 * This source file contains the definition of the described types in the IDL file.
 *
 * This file was generated by the tool gen.
 */

#ifdef _WIN32
// Remove linker warning LNK4221 on Visual Studio
namespace {
char dummy;
}  // namespace
#endif  // _WIN32

#include "SDPltVelocityMsg.h"
#include <fastcdr/Cdr.h>

#include <fastcdr/exceptions/BadParamException.h>
using namespace eprosima::fastcdr::exception;

#include <utility>

SDPltVelocityMsg::SDPltVelocityMsg()
{
    // m_seq_ com.eprosima.idl.parser.typecode.PrimitiveTypeCode@32eebfca
    m_seq_ = 0;
    // m_frame_id_ com.eprosima.idl.parser.typecode.StringTypeCode@4e718207
    m_frame_id_ ="";
    // m_xlinear_ com.eprosima.idl.parser.typecode.PrimitiveTypeCode@1d371b2d
    m_xlinear_ = 0.0;
    // m_ylinear_ com.eprosima.idl.parser.typecode.PrimitiveTypeCode@543c6f6d
    m_ylinear_ = 0.0;
    // m_zlinear_ com.eprosima.idl.parser.typecode.PrimitiveTypeCode@13eb8acf
    m_zlinear_ = 0.0;
    // m_xangular_ com.eprosima.idl.parser.typecode.PrimitiveTypeCode@51c8530f
    m_xangular_ = 0.0;
    // m_yangular_ com.eprosima.idl.parser.typecode.PrimitiveTypeCode@7403c468
    m_yangular_ = 0.0;
    // m_zangular_ com.eprosima.idl.parser.typecode.PrimitiveTypeCode@43738a82
    m_zangular_ = 0.0;

}

SDPltVelocityMsg::~SDPltVelocityMsg()
{








}

SDPltVelocityMsg::SDPltVelocityMsg(
        const SDPltVelocityMsg& x)
{
    m_seq_ = x.m_seq_;
    m_frame_id_ = x.m_frame_id_;
    m_xlinear_ = x.m_xlinear_;
    m_ylinear_ = x.m_ylinear_;
    m_zlinear_ = x.m_zlinear_;
    m_xangular_ = x.m_xangular_;
    m_yangular_ = x.m_yangular_;
    m_zangular_ = x.m_zangular_;
}

SDPltVelocityMsg::SDPltVelocityMsg(
        SDPltVelocityMsg&& x)
{
    m_seq_ = x.m_seq_;
    m_frame_id_ = std::move(x.m_frame_id_);
    m_xlinear_ = x.m_xlinear_;
    m_ylinear_ = x.m_ylinear_;
    m_zlinear_ = x.m_zlinear_;
    m_xangular_ = x.m_xangular_;
    m_yangular_ = x.m_yangular_;
    m_zangular_ = x.m_zangular_;
}

SDPltVelocityMsg& SDPltVelocityMsg::operator =(
        const SDPltVelocityMsg& x)
{

    m_seq_ = x.m_seq_;
    m_frame_id_ = x.m_frame_id_;
    m_xlinear_ = x.m_xlinear_;
    m_ylinear_ = x.m_ylinear_;
    m_zlinear_ = x.m_zlinear_;
    m_xangular_ = x.m_xangular_;
    m_yangular_ = x.m_yangular_;
    m_zangular_ = x.m_zangular_;

    return *this;
}

SDPltVelocityMsg& SDPltVelocityMsg::operator =(
        SDPltVelocityMsg&& x)
{

    m_seq_ = x.m_seq_;
    m_frame_id_ = std::move(x.m_frame_id_);
    m_xlinear_ = x.m_xlinear_;
    m_ylinear_ = x.m_ylinear_;
    m_zlinear_ = x.m_zlinear_;
    m_xangular_ = x.m_xangular_;
    m_yangular_ = x.m_yangular_;
    m_zangular_ = x.m_zangular_;

    return *this;
}

size_t SDPltVelocityMsg::getMaxCdrSerializedSize(
        size_t current_alignment)
{
    size_t initial_alignment = current_alignment;


    current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4);


    current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + 255 + 1;

    current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8);


    current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8);


    current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8);


    current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8);


    current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8);


    current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8);



    return current_alignment - initial_alignment;
}

size_t SDPltVelocityMsg::getCdrSerializedSize(
        const SDPltVelocityMsg& data,
        size_t current_alignment)
{
    (void)data;
    size_t initial_alignment = current_alignment;


    current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4);


    current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.frame_id_().size() + 1;

    current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8);


    current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8);


    current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8);


    current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8);


    current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8);


    current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8);



    return current_alignment - initial_alignment;
}

void SDPltVelocityMsg::serialize(
        eprosima::fastcdr::Cdr& scdr) const
{

    scdr << m_seq_;
    scdr << m_frame_id_;
    scdr << m_xlinear_;
    scdr << m_ylinear_;
    scdr << m_zlinear_;
    scdr << m_xangular_;
    scdr << m_yangular_;
    scdr << m_zangular_;

}

void SDPltVelocityMsg::deserialize(
        eprosima::fastcdr::Cdr& dcdr)
{

    dcdr >> m_seq_;
    dcdr >> m_frame_id_;
    dcdr >> m_xlinear_;
    dcdr >> m_ylinear_;
    dcdr >> m_zlinear_;
    dcdr >> m_xangular_;
    dcdr >> m_yangular_;
    dcdr >> m_zangular_;
}

/*!
 * @brief This function sets a value in member seq_
 * @param _seq_ New value for member seq_
 */
void SDPltVelocityMsg::seq_(
        uint32_t _seq_)
{
    m_seq_ = _seq_;
}

/*!
 * @brief This function returns the value of member seq_
 * @return Value of member seq_
 */
uint32_t SDPltVelocityMsg::seq_() const
{
    return m_seq_;
}

/*!
 * @brief This function returns a reference to member seq_
 * @return Reference to member seq_
 */
uint32_t& SDPltVelocityMsg::seq_()
{
    return m_seq_;
}

/*!
 * @brief This function copies the value in member frame_id_
 * @param _frame_id_ New value to be copied in member frame_id_
 */
void SDPltVelocityMsg::frame_id_(
        const std::string& _frame_id_)
{
    m_frame_id_ = _frame_id_;
}

/*!
 * @brief This function moves the value in member frame_id_
 * @param _frame_id_ New value to be moved in member frame_id_
 */
void SDPltVelocityMsg::frame_id_(
        std::string&& _frame_id_)
{
    m_frame_id_ = std::move(_frame_id_);
}

/*!
 * @brief This function returns a constant reference to member frame_id_
 * @return Constant reference to member frame_id_
 */
const std::string& SDPltVelocityMsg::frame_id_() const
{
    return m_frame_id_;
}

/*!
 * @brief This function returns a reference to member frame_id_
 * @return Reference to member frame_id_
 */
std::string& SDPltVelocityMsg::frame_id_()
{
    return m_frame_id_;
}
/*!
 * @brief This function sets a value in member xlinear_
 * @param _xlinear_ New value for member xlinear_
 */
void SDPltVelocityMsg::xlinear_(
        double _xlinear_)
{
    m_xlinear_ = _xlinear_;
}

/*!
 * @brief This function returns the value of member xlinear_
 * @return Value of member xlinear_
 */
double SDPltVelocityMsg::xlinear_() const
{
    return m_xlinear_;
}

/*!
 * @brief This function returns a reference to member xlinear_
 * @return Reference to member xlinear_
 */
double& SDPltVelocityMsg::xlinear_()
{
    return m_xlinear_;
}

/*!
 * @brief This function sets a value in member ylinear_
 * @param _ylinear_ New value for member ylinear_
 */
void SDPltVelocityMsg::ylinear_(
        double _ylinear_)
{
    m_ylinear_ = _ylinear_;
}

/*!
 * @brief This function returns the value of member ylinear_
 * @return Value of member ylinear_
 */
double SDPltVelocityMsg::ylinear_() const
{
    return m_ylinear_;
}

/*!
 * @brief This function returns a reference to member ylinear_
 * @return Reference to member ylinear_
 */
double& SDPltVelocityMsg::ylinear_()
{
    return m_ylinear_;
}

/*!
 * @brief This function sets a value in member zlinear_
 * @param _zlinear_ New value for member zlinear_
 */
void SDPltVelocityMsg::zlinear_(
        double _zlinear_)
{
    m_zlinear_ = _zlinear_;
}

/*!
 * @brief This function returns the value of member zlinear_
 * @return Value of member zlinear_
 */
double SDPltVelocityMsg::zlinear_() const
{
    return m_zlinear_;
}

/*!
 * @brief This function returns a reference to member zlinear_
 * @return Reference to member zlinear_
 */
double& SDPltVelocityMsg::zlinear_()
{
    return m_zlinear_;
}

/*!
 * @brief This function sets a value in member xangular_
 * @param _xangular_ New value for member xangular_
 */
void SDPltVelocityMsg::xangular_(
        double _xangular_)
{
    m_xangular_ = _xangular_;
}

/*!
 * @brief This function returns the value of member xangular_
 * @return Value of member xangular_
 */
double SDPltVelocityMsg::xangular_() const
{
    return m_xangular_;
}

/*!
 * @brief This function returns a reference to member xangular_
 * @return Reference to member xangular_
 */
double& SDPltVelocityMsg::xangular_()
{
    return m_xangular_;
}

/*!
 * @brief This function sets a value in member yangular_
 * @param _yangular_ New value for member yangular_
 */
void SDPltVelocityMsg::yangular_(
        double _yangular_)
{
    m_yangular_ = _yangular_;
}

/*!
 * @brief This function returns the value of member yangular_
 * @return Value of member yangular_
 */
double SDPltVelocityMsg::yangular_() const
{
    return m_yangular_;
}

/*!
 * @brief This function returns a reference to member yangular_
 * @return Reference to member yangular_
 */
double& SDPltVelocityMsg::yangular_()
{
    return m_yangular_;
}

/*!
 * @brief This function sets a value in member zangular_
 * @param _zangular_ New value for member zangular_
 */
void SDPltVelocityMsg::zangular_(
        double _zangular_)
{
    m_zangular_ = _zangular_;
}

/*!
 * @brief This function returns the value of member zangular_
 * @return Value of member zangular_
 */
double SDPltVelocityMsg::zangular_() const
{
    return m_zangular_;
}

/*!
 * @brief This function returns a reference to member zangular_
 * @return Reference to member zangular_
 */
double& SDPltVelocityMsg::zangular_()
{
    return m_zangular_;
}


size_t SDPltVelocityMsg::getKeyMaxCdrSerializedSize(
        size_t current_alignment)
{
    size_t current_align = current_alignment;











    return current_align;
}

bool SDPltVelocityMsg::isKeyDefined()
{
    return false;
}

void SDPltVelocityMsg::serializeKey(
        eprosima::fastcdr::Cdr& scdr) const
{
    (void) scdr;
            
}
